<?php
class Struct {
    protected $element;
    public function addElement(Person $element) {
        $this->element[] = $element;
    }
    public function removeElement(Person $element){
        foreach ($this->element as $k => $e)
        {
            if ($e === $element) {
                unset($this->element[$k]);
            }
        }
    }

    public function display(State $visitor) {
        foreach ($this->element as $e)
        {
            $e->accept($visitor);
        }
    }
}